<?php

namespace app\mall\ui\form;

use app\mall\model\MallRegion;

/**
 * 地区设置表单
 */
class MallRegionForm
{
    public function name()
    {
        return [
            'type' => 'input',
            'title' => '地区名称',
            'field' => 'name',
            'validate' =>
                [
                    [
                        'required' => true,
                        'message' => '不能为空',
                    ],
                ],
        ];
    }

    public function parent_names()
    {
        return [
            'type' => 'cityArea',
            'title' => '上级地区',
            'field' => 'parent_names',
            'props' => [
                'showAllLevels' => false,
                'props' => [
                    'checkStrictly' => true
                ]
            ]
        ];
    }

    public function inx()
    {
        return [
            'type' => 'number',
            'title' => '排序',
            'field' => 'inx',
            'value' => 100
        ];
    }
}